.navbar-brand {
    font-weight: bold;
}

.card {
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-2px);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-running {
    background-color: #28a745;
}

.status-stopped {
    background-color: #dc3545;
}

.metrics-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
}

.protocol-badge {
    font-size: 0.8em;
}

.packet-row {
    cursor: pointer;
}

.packet-row:hover {
    background-color: #f8f9fa;
}

.fixed-table {
    height: 500px;
    overflow-y: auto;
}

.text-truncate-custom {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 20px;
}

.list-group-item {
    transition: background-color 0.2s;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* 加载动画 */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 数据包详情面板样式 */
.packet-detail-panel {
    margin-top: 10px;
    animation: slideDown 0.3s ease-out;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.packet-row.selected {
    background-color: #e3f2fd !important;
    border-left: 4px solid #2196f3;
}

.packet-row.selected:hover {
    background-color: #bbdefb !important;
}

/* 协议层样式 */
.protocol-layer {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.protocol-layer-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.protocol-layer-header:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.protocol-layer-content {
    padding: 16px;
    background-color: #fafafa;
    border-top: 1px solid #e0e0e0;
}

.protocol-field {
    display: flex;
    justify-content:left;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.protocol-field:last-child {
    border-bottom: none;
}

.field-name {
    font-weight: 600;
    color: #333;
    min-width: 120px;
}

.field-value {
    color: #000;
    font-family: 'Courier New', monospace;
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* 十六进制查看器样式 */
.hex-viewer-container {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
}

.hex-viewer {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    color: #d4d4d4;
}

.hex-line {
    display: flex;
    margin-bottom: 4px;
    white-space: nowrap;
}

.hex-offset {
    color: #569cd6;
    margin-right: 16px;
    min-width: 80px;
    font-weight: bold;
}

.hex-bytes {
    color: #d4d4d4;
    margin-right: 16px;
    min-width: 400px;
}

.hex-bytes .byte {
    margin-right: 1px;
    padding: 1px 2px;
    border-radius: 2px;
}

.hex-bytes .byte:hover {
    background-color: #404040;
    cursor: pointer;
}

.hex-bytes .byte.highlight {
    background-color: #ffd700;
    color: #000;
}

.hex-ascii {
    color: #ce9178;
    min-width: 200px;
    font-family: 'Courier New', monospace;
}

.hex-ascii .char {
    display: inline-block;
    width: 12px;
    text-align: center;
}

.hex-ascii .char.highlight {
    background-color: #ffd700;
    color: #000;
}

/* 原始文本样式 */
.raw-content {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .card-body {
        padding: 1rem 0.5rem;
    }

    .btn-sm {
        font-size: 0.7rem;
    }

    .hex-viewer {
        font-size: 11px;
    }

    .hex-bytes {
        min-width: 300px;
    }

    .hex-ascii {
        min-width: 150px;
    }

    .protocol-field {
        flex-direction: column;
        align-items: flex-start;
    }

    .field-name {
        margin-bottom: 4px;
        min-width: auto;
    }
}